package com.woniuxy.ticketorder.exception;

import com.woniuxy.commnes.entity.ResponseResult;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @ClassName TicketOrderException
 * @Description TODO
 * @Author zx
 * @Date 2021-02-27 10:00:22
 * @Version 1.0
 */
@RestControllerAdvice()
public class TicketOrderException{

    @ExceptionHandler(MethodArgumentNotValidException.class)
    public ResponseResult<Void> daExceptionHandler(MethodArgumentNotValidException e){
//        e.printStackTrace();
        return new ResponseResult(101,"参数错误");
    }
}
